﻿using NewRetail.Application.Components.Goods.Entity;
using NewRetail.Application.Components.Warehouse.Entity;
using System;
using System.Collections.Generic;

namespace NewRetail.Application.Components.Goods.Model
{
    public class GoodsComprehensiveDto
    {
        /// <summary>
        /// 商品相关信息
        /// </summary>
        public GoodsInfo goodsInfo { get; set; }
        /// <summary>
        /// 额外信息
        /// </summary>
        public ICollection<GoodsExtInfoDto> GoodsExtInfos { get; set; }
    }
    public class GoodsExtInfoDto
    {
        /// <summary>
        /// 仓库Id
        /// </summary>
        public string warehouseID { get; set; }
        /// <summary>
        ///第一次入库数量
        /// </summary>
        public decimal? firstInQuantity { get; set; }
        /// <summary>
        /// 除第一次外的入库数量，即补货数量
        /// </summary>
        public decimal? replenishmentQuantity { get; set; }
        /// <summary>
        /// 销售数量
        /// </summary>
        public decimal? saleQuantity { get; set; }
        /// <summary>
        /// 实时库存
        /// </summary>
        public decimal? warehouseGoodsNum { get; set; }
        /// <summary>
        /// 剩余周期，即剩余退货倒计时天数
        /// </summary>
        public int remainPeriod { get; set; }
        /// <summary>
        /// 最近一次入库价
        /// </summary>
        public decimal latestInPrice { get; set; } = 0;
        /// <summary>
        /// 会员价
        /// </summary>
        public decimal memberPrice { get; set; } = 0;
    }

    #region 颜色尺码综合查询返回
    public class GoodsComprehensiveColorSizeDto
    {
        /// <summary>
        /// 商品相关信息
        /// </summary>
        public GoodsTsInfoDto goodsInfo { get; set; }
    }
    public class GoodsTsInfoDto
    {
        public string Id { get; set; }
        public string goodsName { get; set; }
        public string barCode { get; set; }
        public string categoryID { get; set; }
        public int brand { get; set; }
        public string specifications { get; set; }
        public int saleType { get; set; }
        public int metering { get; set; }
        public int unit { get; set; }
        public string originPlace { get; set; }
        public int qualityTime { get; set; }
        public decimal price { get; set; }
        public string imgUrl { get; set; }
        public bool IsDeleted { get; set; }
        /// <summary>
        /// 助记词
        /// </summary>
        public string mnemonicWords { get; set; }
        /// <summary>
        /// 颜色代码
        /// </summary>
        public int colourCode { get; set; }
        /// <summary>
        /// 颜色名
        /// </summary>
        public string colourName { get; set; }
        /// <summary>
        /// 尺码类型代码
        /// </summary>
        public int sizeStCode { get; set; }
        /// <summary>
        /// 尺码类型名
        /// </summary>
        public string sizeStName { get; set; }
        /// <summary>
        /// 商品货号
        /// </summary>
        public string goodsCode { get; set; }
        /// <summary>
        /// 商品主Id
        /// </summary>
        public string goodsMstId { get; set; }

        public GoodsCategory GoodsCategory { get; set; }

        #region 尺码归类显示
        public IEnumerable<SizeInfoDto> Sizes { get; set; }
        #endregion
    }
    public class SizeInfoDto
    {
        /// <summary>
        /// 商品表Id
        /// </summary>
        public string goodsId { get; set; }
        public string barCode { get; set; }
        public string No { get; set; }
        public int? addUserID { get; set; }
        public DateTime? addTime { get; set; }
        public int? updateUserID { get; set; }
        public DateTime? updateTime { get; set; }
        /// <summary>
        /// 尺码代码
        /// </summary>
        public int sizeCode { get; set; }
        /// <summary>
        /// 尺码名
        /// </summary>
        public string sizeName { get; set; }

        public ICollection<WarehouseGoods> GoodsPrices { get; set; }
        public ICollection<InOutWarehousing> InOutWarehousings { get; set; }
        /// <summary>
        /// 额外信息
        /// </summary>
        public ICollection<GoodsExtInfoDto> GoodsExtInfos { get; set; }
    }
    #endregion

    #region 手机掌售通使用
    public class GoodsMobileComprehensiveDto
    {
        /// <summary>
        /// 商品相关信息
        /// </summary>
        public GoodsInfo goodsInfo { get; set; }
        /// <summary>
        /// 供应商信息
        /// </summary>
        public ICollection<SupplierMobileInfoDto> Suppliers { get; set; }
        /// <summary>
        /// 额外信息
        /// </summary>
        public ICollection<GoodsMobileExtInfoDto> GoodsMobileExtInfos { get; set; }
    }
    public class GoodsMobileExtInfoDto
    {
        /// <summary>
        /// 仓库Id
        /// </summary>
        public string warehouseID { get; set; }
        /// <summary>
        /// 库存(库存表的库存)
        /// </summary>
        public decimal? warehouseGoodsNum { get; set; }
        /// <summary>
        /// 实时库存(实时计算的库存)
        /// </summary>
        public decimal? warehouseGoodsRealNum { get; set; }

        #region 掌售通商品综合查询需要使用
        /// <summary>
        ///第一次入库数量
        /// </summary>
        public decimal? firstInQuantity { get; set; }
        /// <summary>
        /// 除第一次外的入库数量，即补货数量
        /// </summary>
        public decimal? replenishmentQuantity { get; set; }
        /// <summary>
        /// 销售数量
        /// </summary>
        public decimal? saleQuantity { get; set; }
        #endregion
    }
    public class SupplierMobileInfoDto
    {
        /// <summary>
        /// 供应商Id
        /// </summary>
        public string supplierID { get; set; }
        /// <summary>
        /// 供应商名
        /// </summary>
        public string supplierName { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        public string No { get; set; }
    }
    public class GoodsMobileDetDto
    {
        /// <summary>
        /// 商品相关信息
        /// </summary>
        public GoodsInfo goodsInfo { get; set; }
        /// <summary>
        /// 额外信息
        /// </summary>
        public ICollection<GoodsMobileExtInfoDto> GoodsMobileExtInfos { get; set; }
    }
    #endregion

    #region 查询下拉商品返回数据
    public class QueryAllGoodsByWarehouseResponse
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        public string goodsName { get; set; }
        /// <summary>
        /// 条码
        /// </summary>
        public string barCode { get; set; }
        /// <summary>
        /// 商品Id
        /// </summary>
        public string goodsID { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        public string No { get; set; }
    }
    #endregion
}
